home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Libris Britannia 4
/
science library(b).zip
/
science library(b)
/
TECHNICA
/
COMPUTER
/
H254.ZIP
/
IRITSM3S.ZIP
/
IRIT
/
SOLID6.IRT
< prev
next >
Wrap
Text File
|
1991-09-04
|
1KB
|
52 lines
#
# Simple test for the surface of revolution operator. Defines the cross secotion
# in line and then rotate it along Z axes.
#
# Created by Gershon Elber, Mar 89
#
save_mat = view_mat;
save_res = resolution;
v1 = vector( 0.6, 0.0, 0.25);
v2 = vector( 0.9, 0.0, 0.25);
v3 = vector( 0.9, 0.0, 0.2);
v4 = vector( 0.8, 0.0, 0.2);
v5 = vector( 0.8, 0.0,-0.2);
v6 = vector( 0.9, 0.0,-0.2);
v7 = vector( 0.9, 0.0,-0.25);
v8 = vector( 0.6, 0.0,-0.25);
v9 = vector( 0.6, 0.0,-0.2);
v10 = vector( 0.7, 0.0,-0.2);
v11 = vector( 0.7, 0.0, 0.2);
v12 = vector( 0.6, 0.0, 0.2);
cross = poly( list( v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12 ) );
view(list(cross), true);
resolution = 32;
T1 = surfrev(cross);
free(cross);
interact(list(T1), false);
resolution = 16;
T2 = cylin(vector(-1.0, 0.0, 0.0), vector( 2.0, 0.0, 0.0), 0.15);
T3 = cylin(vector( 0.0, -1.0, 0.0), vector( 0.0, 2.0, 0.0), 0.15);
view(list(T2, T3), false);
S1 = T1 - T2 - T3;
free(T1);
free(T2);
free(T3);
final = convex(S1);
free(S1);
interact(list(final), 0);
save("solid6", list(view_mat,final));
free(final);
resolution = save_res;
view_mat = save_mat;